package starter.model;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * @author 上等的猪头肉
 * @Title: Person
 * @ProjectName ElasticsearchSpringData
 * @Description: TODO
 * @date 2018/10/24 15:06
 */
@Data
@Document(indexName = "person", type = "sys_person", shards = 1, replicas = 0)
@ToString
public class Person {
    @Id
    private String id ;

    @Field
    private String status;


    @Field(fielddata = true)
    private Long time ;

    @Field
    private String username;

    @Field
    private String password;
}
